{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil Consolas;}{\f1\fnil\fcharset134 \'cb\'ce\'cc\'e5;}}
{\colortbl ;\red127\green0\blue85;\red0\green0\blue0;\red0\green0\blue192;\red42\green0\blue255;\red106\green62\blue62;}
{\*\generator Riched20 10.0.17763}\viewkind4\uc1 
\pard\sa200\sl276\slmult1\cf1\b\f0\fs20\lang2052 package\cf2\b0  hj;\cf0\par
\par
\cf1\b import\cf2\b0  java.applet.Applet;\cf0\par
\cf1\b import\cf2\b0  java.applet.AudioClip;\cf0\par
\cf1\b import\cf2\b0  java.awt.Canvas;\cf0\par
\cf1\b import\cf2\b0  java.awt.Color;\cf0\par
\cf1\b import\cf2\b0  java.awt.Dimension;\cf0\par
\cf1\b import\cf2\b0  java.awt.Font;\cf0\par
\cf1\b import\cf2\b0  java.awt.Graphics;\cf0\par
\cf1\b import\cf2\b0  java.awt.event.ActionEvent;\cf0\par
\cf1\b import\cf2\b0  java.awt.event.ActionListener;\cf0\par
\cf1\b import\cf2\b0  java.io.File;\cf0\par
\cf1\b import\cf2\b0  java.net.URI;\cf0\par
\cf1\b import\cf2\b0  java.net.URL;\cf0\par
\cf1\b import\cf2\b0  javax.swing.JButton;\cf0\par
\cf1\b import\cf2\b0  javax.swing.JFrame;\cf0\par
\cf1\b import\cf2\b0  javax.swing.JPanel;\cf0\par
\cf1\b import\cf2\b0  javax.swing.Timer;\cf0\par
\par
\cf1\b public\cf2\b0  \cf1\b class\cf2\b0  \ul ljc\ulnone  \cf1\b extends\cf2\b0  JFrame \cf1\b implements\cf2\b0  ActionListener\{\cf0\par
\cf2\tab\cf1\b public\cf2\b0  \cf1\b boolean\cf2\b0  \cf3 sign\cf2 ;\cf0\par
\cf2\tab\cf1\b private\cf2\b0  FlagCanvas1 \cf3 canvas1\cf2 ;\cf0\par
\cf2\tab\cf1\b private\cf2\b0  FlagCanvas \cf3 canvas\cf2 ;\cf0\par
\cf2\tab File \cf3 f\cf2 ;\cf0\par
\cf2\tab URI \cf3 uri\cf2 ;\cf0\par
\cf2\tab URL \cf3 url\cf2 ;\cf0\par
\cf2\tab\cf0\par
\cf2\tab\cf1\b public\cf2\b0  ljc()\{\cf0\par
\cf2\tab\tab\cf1\b super\cf2\b0 (\cf4 "\f1\'c9\'fd\'c6\'ec\f0 "\cf2 );\cf0\par
\cf2\tab\tab Dimension \cf5 dim\cf2 =getToolkit().getScreenSize();\cf0\par
\cf2\tab     \cf1\b this\cf2\b0 .setBounds(\cf5 dim\cf2 .\cf3 width\cf2 /4,\cf5 dim\cf2 .\cf3 height\cf2 /4,\cf5 dim\cf2 .\cf3 width\cf2 /2,\cf5 dim\cf2 .\cf3 height\cf2 /2);\cf0\par
\cf2\tab\tab setLocationRelativeTo(\cf1\b null\cf2\b0 );\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .setBackground(Color.\cf3\b\i white\cf2\b0\i0 );\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .setDefaultCloseOperation(\cf3\b\i EXIT_ON_CLOSE\cf2\b0\i0 );\cf0\par
\cf2\tab\tab JPanel \cf5 jpanel\cf2 =\cf1\b new\cf2\b0  JPanel();\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .getContentPane().add(\cf5 jpanel\cf2 ,\cf4 "South"\cf2 );\cf0\par
\cf2\tab\tab JButton \cf5 button_start\cf2 =\cf1\b new\cf2\b0  JButton(\cf4 "\f1\'c9\'fd\'c6\'ec\f0 "\cf2 );\cf0\par
\cf2\tab\tab\cf5 button_start\cf2 .setFont(\cf1\b new\cf2\b0  Font(\cf4 "\f1\'bf\'ac\'cc\'e5\f0 "\cf2 ,Font.\cf3\b\i BOLD\cf2\b0\i0 ,18));\cf0\par
\cf2\tab\tab\cf5 jpanel\cf2 .add(\cf5 button_start\cf2 );\cf0\par
\cf2\tab\tab\cf5 button_start\cf2 .addActionListener(\cf1\b this\cf2\b0 );\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .\cf3 canvas1\cf2 =\cf1\b new\cf2\b0  FlagCanvas1();\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .getContentPane().add(\cf1\b this\cf2\b0 .\cf3 canvas1\cf2 ,\cf4 "Center"\cf2 );\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .setVisible(\cf1\b true\cf2\b0 );\tab\cf0\par
\cf2\tab\}\cf0\par
\cf2\tab\cf0\par
\cf2\tab\cf1\b public\cf2\b0  \cf1\b void\cf2\b0  actionPerformed(ActionEvent \cf5 ev\cf2 )\{\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .getContentPane().remove(\cf1\b this\cf2\b0 .\cf3 canvas1\cf2 );\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .\cf3 canvas\cf2 =\cf1\b new\cf2\b0  FlagCanvas();\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .getContentPane().add(\cf1\b this\cf2\b0 .\cf3 canvas\cf2 ,\cf4 "Center"\cf2 );\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .setVisible(\cf1\b true\cf2\b0 );\tab\cf0\par
\cf2\tab\tab\cf1\b try\cf2\b0\{\cf0\par
\cf2\tab\tab\tab\cf1\b this\cf2\b0 .\cf3 f\cf2 =\cf1\b new\cf2\b0  File(\cf4 "C:\\\\Users\\\\Administrator\\\\Desktop\\\\new.wav"\cf2 );\cf0\par
\cf2\tab\tab\tab\cf3 uri\cf2 =\cf3 f\cf2 .toURI();\cf0\par
\cf2\tab\tab\tab\cf3 url\cf2 =\cf3 uri\cf2 .toURL();\cf0\par
\cf2\tab\tab\tab AudioClip \cf5 aau\cf2 ;\cf0\par
\cf2\tab\tab\tab\cf5 aau\cf2 =Applet.\i newAudioClip\i0 (\cf3 url\cf2 );\cf0\par
\cf2\tab\tab\tab\cf5 aau\cf2 .play();\cf0\par
\cf2\tab\tab\tab\}\cf1\b catch\cf2\b0 (Exception \cf5 e\cf2 )\{\cf5 e\cf2 .printStackTrace();\}\cf0\par
\cf2\tab\}\cf0\par
\cf2\tab\cf0\par
\cf2\tab\cf1\b public\cf2\b0  \cf1\b static\cf2\b0  \cf1\b void\cf2\b0  main(String[] \cf5 args\cf2 ) \{\cf0\par
\cf2\tab\tab\cf1\b new\cf2\b0  ljc();\cf0\par
\cf2\tab\}\cf0\par
\cf2\}\cf0\par
\par
\cf1\b class\cf2\b0  \ul FlagCanvas\ulnone  \cf1\b extends\cf2\b0  Canvas \cf1\b implements\cf2\b0  ActionListener\{\cf0\par
\cf2\tab\cf1\b private\cf2\b0  Timer \cf3 timer\cf2 ;\cf0\par
\cf2\tab\cf1\b private\cf2\b0  Flag \cf3 flag\cf2 ;\cf0\par
\cf2\tab\cf0\par
\cf2\tab\cf1\b private\cf2\b0  \cf1\b static\cf2\b0  \cf1\b class\cf2\b0  Flag\{\cf0\par
\cf2\tab\tab\cf1\b int\cf2\b0  \cf3 y\cf2 ;\cf0\par
\cf2\tab\tab\cf1\b public\cf2\b0  \cf1\b boolean\cf2\b0  \cf3 up\cf2 ;\cf0\par
\cf2\tab\tab Flag(\cf1\b int\cf2\b0  \cf5 y\cf2 )\{\cf0\par
\cf2\tab\tab\tab\cf1\b this\cf2\b0 .\cf3 y\cf2 =\cf5 y\cf2 ;\cf0\par
\cf2\tab\tab\tab\cf1\b boolean\cf2\b0  \cf5\ul up\cf2\ulnone =\cf1\b false\cf2\b0 ;\cf0\par
\cf2\tab\tab\}\cf0\par
\cf2\tab\}\cf0\par
\cf2\tab\cf1\b public\cf2\b0  FlagCanvas()\{\cf0\par
\cf2\tab\tab\cf1\b this\cf2\b0 .\cf3 flag\cf2 =\cf1\b new\cf2\b0  Flag(380);\cf0\par
\cf2\tab\tab\cf3 timer\cf2 =\cf1\b new\cf2\b0  Timer(1200,\cf1\b this\cf2\b0 );\cf0\par
\cf2\tab\tab\cf3 timer\cf2 .start();\cf0\par
\cf2\tab\}\cf0\par
\cf2\tab\cf0\par
\cf2\tab\cf1\b public\cf2\b0  \cf1\b void\cf2\b0  paint(Graphics \cf5 g\cf2 )\{\cf0\par
\cf2\tab\tab\cf1\b int\cf2\b0  \cf5 x\cf2 =\cf1\b this\cf2\b0 .getWidth();\cf0\par
\cf2\tab\tab\cf1\b int\cf2\b0  \cf5 y\cf2 =\cf1\b this\cf2\b0 .getHeight();\cf0\par
\cf2\tab\tab\cf5 g\cf2 .setColor(Color.\cf3\b\i black\cf2\b0\i0 );\cf0\par
\cf2\tab\tab\cf5 g\cf2 .drawLine(\cf5 x\cf2 *1/3,\cf5 y\cf2 ,\cf5 x\cf2 *1/3,\cf5 y\cf2 *1/5);\cf0\par
\cf2\tab\tab\cf1\b for\cf2\b0 (\cf1\b int\cf2\b0  \cf5 i\cf2 =1;\cf5 i\cf2 <6;\cf5 i\cf2 ++)\{\cf0\par
\cf2\tab\tab\cf5 g\cf2 .drawLine(\cf5 x\cf2 *1/3+\cf5 i\cf2 ,\cf5 y\cf2 ,\cf5 x\cf2 *1/3+\cf5 i\cf2 ,\cf5 y\cf2 *1/5);\cf0\par
\cf2\tab\tab\}\cf0\par
\cf2\tab\tab\cf5 g\cf2 .setColor(Color.\cf3\b\i red\cf2\b0\i0 );\cf0\par
\cf2\tab\tab\cf5 g\cf2 .fillOval(\cf5 x\cf2 *4/5, \cf5 y\cf2 *1/50,100,100);\cf0\par
\cf2\tab\tab\cf5 g\cf2 .fill3DRect(\cf5 x\cf2 *1/3+5,\cf3 flag\cf2 .\cf3 y\cf2 , 120, 80, \cf1\b true\cf2\b0 );\cf0\par
\cf2\tab\tab\tab\cf3 flag\cf2 .\cf3 y\cf2 =\cf3 flag\cf2 .\cf3 up\cf2 ?91:\cf3 flag\cf2 .\cf3 y\cf2 -10;\cf0\par
\cf2\tab\tab\tab\cf1\b if\cf2\b0 (\cf3 flag\cf2 .\cf3 y\cf2 <=90)\{\cf0\par
\cf2\tab\tab\tab\tab\cf3 flag\cf2 .\cf3 up\cf2 =!\cf3 flag\cf2 .\cf3 up\cf2 ;\cf0\par
\cf2\tab\tab\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\'c4\'c5\'da\'bb\'f0\f0 ,\f1\'c7\'b0\'bd\'f8\'c7\'b0\'bd\'f8\'c7\'b0\'bd\'f8\'bd\'f8\f0 !"\cf2 ;\cf0\par
\cf2\tab\tab\tab\cf5 g\cf2 .setFont(\cf1\b new\cf2\b0  Font(\cf4 "\f1\'bf\'ac\'cc\'e5\f0 "\cf2 ,Font.\cf3\b\i BOLD\cf2\b0\i0 ,20));\cf0\par
\cf2\tab\tab\tab\cf5 g\cf2 .drawString(\cf5 lyric1\cf2 ,0,70);\cf0\par
\cf2\tab\tab\tab\cf5 g\cf2 .drawString(\cf5 lyric2\cf2 ,0,90);\cf0\par
\cf2\tab\}\cf0\par
\cf2\tab\cf0\par
\cf2\tab\cf1\b public\cf2\b0  \cf1\b void\cf2\b0  actionPerformed(ActionEvent \cf5 ev\cf2 )\{\cf0\par
\cf2\tab\tab repaint();\cf0\par
\cf2\tab\}\cf0\par
\cf2\}\cf0\par
\par
\cf1\b class\cf2\b0  \ul FlagCanvas1\ulnone  \cf1\b extends\cf2\b0  Canvas\{\cf0\par
\cf2\tab\cf1\b public\cf2\b0  \cf1\b void\cf2\b0  paint(Graphics \cf5 g\cf2 )\{\cf0\par
\cf2\tab\tab\cf1\b int\cf2\b0  \cf5 x\cf2 =\cf1\b this\cf2\b0 .getWidth();\cf0\par
\cf2\tab\tab\cf1\b int\cf2\b0  \cf5 y\cf2 =\cf1\b this\cf2\b0 .getHeight();\cf0\par
\cf2\tab\tab\cf5 g\cf2 .setColor(Color.\cf3\b\i black\cf2\b0\i0 );\cf0\par
\cf2\tab\tab\cf5 g\cf2 .drawLine(\cf5 x\cf2 *1/3,\cf5 y\cf2 ,\cf5 x\cf2 *1/3,\cf5 y\cf2 *1/5);\cf0\par
\cf2\tab\tab\cf1\b for\cf2\b0 (\cf1\b int\cf2\b0  \cf5 i\cf2 =1;\cf5 i\cf2 <6;\cf5 i\cf2 ++)\{\cf0\par
\cf2\tab\tab\cf5 g\cf2 .drawLine(\cf5 x\cf2 *1/3+\cf5 i\cf2 ,\cf5 y\cf2 ,\cf5 x\cf2 *1/3+\cf5 i\cf2 ,\cf5 y\cf2 *1/5);\cf0\par
\cf2\tab\tab\}\cf0\par
\cf2\tab\tab\cf5 g\cf2 .setColor(Color.\cf3\b\i red\cf2\b0\i0 );\cf0\par
\cf2\tab\tab\cf5 g\cf2 .fillOval(\cf5 x\cf2 *4/5, \cf5 y\cf2 *1/50,100,100);\cf0\par
\cf2\tab\tab\cf5 g\cf2 .fill3DRect(\cf5 x\cf2 *1/3+5,380, 120, 80, \cf1\b true\cf2\b0 );\tab\cf0\par
\cf2\tab\}\cf0\par
\cf2\}\cf0\f1\fs22\par
}
 